package com.fortune.dao;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fortune.dto.in.distributorOrder.DistributorOrderAddDto;
import com.fortune.dto.in.distributorOrder.DistributorOrderDetailAddDto;
import com.fortune.dto.in.distributorOrder.DistributorOrderEditDto;
import com.fortune.dto.in.distributorOrder.DistributorOrderListDto;
import com.fortune.entity.MProductInfo;
import com.fortune.entity.MUserInfo;
import com.fortune.vo.distributorOrderMgt.DistributorOrder;
import com.fortune.vo.distributorOrderMgt.DistributorOrderDetail;

public interface DistributorOrderMgtDao {
	/**
	 * 经销商订单列表
	 * @param distributorOrderMgtListDto
	 * @return
	 */
	List<DistributorOrder> list(@Param("mUserInfo")MUserInfo mUserInfo,@Param("distributorOrderMgtListDto")DistributorOrderListDto distributorOrderMgtListDto);
	
	int count(@Param("mUserInfo")MUserInfo mUserInfo,@Param("distributorOrderMgtListDto")DistributorOrderListDto distributorOrderMgtListDto);
	
	/**
	 * 经销商订单详情
	 * @param mId
	 * @param dId
	 * @param orderId
	 * @return
	 */
	DistributorOrderDetail detail(@Param("mId")String mId,@Param("dId")String dId,@Param("orderId")String orderId);
	
	MProductInfo dProductInfo(@Param("mId")String mId,@Param("dId")String dId);
	
	int add(@Param("addDto")DistributorOrderAddDto addDto,@Param("mId")String mId,@Param("createUser")String createUser,@Param("id")String id,@Param("pTotalPrice")BigDecimal pTotalPrice,@Param("dTotalPrice")BigDecimal dTotalPrice);
	
	int addDetail(@Param("detailAddDto")DistributorOrderDetailAddDto detailAddDto,@Param("mId")String mId,@Param("dId")String dId,@Param("id")String id,@Param("totalPrice")BigDecimal totalPrice,@Param("boxTotalPrice")BigDecimal boxTotalPrice,@Param("price")BigDecimal price);
	
	int edit(@Param("editDto")DistributorOrderEditDto editDto,@Param("mId")String mId,@Param("createUser")String createUser,@Param("pTotalPrice")BigDecimal pTotalPrice,@Param("dTotalPrice")BigDecimal dTotalPrice);
	
	int deleteDetal(@Param("mId")String mId,@Param("dId")String dId,@Param("id")String id);
	
	int delete(@Param("mId")String mId,@Param("dId")String dId,@Param("orderId")String orderId);
	
	int approve(@Param("mId")String mId,@Param("dId")String dId,@Param("orderId")String orderId,@Param("shipStore")String shipStore,@Param("createUser")String createUser);
}
